<template>
  <div @click="handleOpenVip" title="点击升级身份" class="pointer flex">
    <span class="c9999" v-if="vip==1">普通用户</span>
    <span class="gold" v-else-if="vip==7">SVIP</span>
    <span class="green" v-else-if="vip==4">年会员</span>
    <span class="green" v-else-if="vip==3">季会员</span>
    <span class="green" v-else-if="vip==2">月会员</span>
    <slot></slot>
  </div>
  <teleport to="body">
    <!--全局登录弹窗-->
    <ksd-vip ref="vipRef"></ksd-vip>
  </teleport>
</template>
<script setup>
const props = defineProps({
  vip:{
    type:Number,
    default:1
  }
})
const vipRef = ref({})
// 打开会员中心
const handleOpenVip = () => {
  vipRef.value.handleOpen()
}

</script>
<style scoped>
</style>